﻿using AutoMapper;
using Modules;
using Modules.Attachment;
using Modules.Project;
using PmSoft;
using System.ComponentModel.DataAnnotations;

namespace ManagementApi.Models.Project;

/// <summary>
/// 保证金账户Dto
/// </summary>
public class ProjectGuaranteeAccountEditForm
{
    [Display(Name = "id")]
    public int? Id { get; set; }

    /// <summary>
    /// 保证金类型（1：保证金账户 2：工程担保公司保函账户 3：工程保证保险 4：银行保函）
    ///</summary>
    [Display(Name = "保证金类型")]
    [Required(ErrorMessage = "{0}不能为空")]
    public 保证金类型 Type { get; set; }

    /// <summary>
    /// 保证金账户名称/工程担保公司名称/保险公司名称/担保银行名称
    ///</summary>
    [Display(Name = "账户名称")]
    [Required(ErrorMessage = "{0}不能为空")]
    public string? Name { get; set; }

    /// <summary>
    /// 账户编号
    ///</summary>
    [Display(Name = "账户编号")]
    [Required(ErrorMessage = "{0}不能为空")]
    public string? Code { get; set; }

    /// <summary>
    /// 开户银行
    ///</summary>
    [Display(Name = "开户银行")]
    public string? BankName { get; set; }

    /// <summary>
    /// 开户银行账号
    ///</summary>
    [Display(Name = "开户银行账号")]
    public long? BankNo { get; set; }

    /// <summary>
    /// 工程担保公司社会信用代码/保险公司信用代码/担保银行统一信用代码
    ///</summary>
    [Display(Name = "工程担保公司社会信用代码")]
    public string? Socialcreditcode { get; set; }

    /// <summary>
    /// 工程担保公司负责人/保险公司负责人
    ///</summary>
    [Display(Name = "工程担保公司负责人")]
    public string? Superintendent { get; set; }

    /// <summary>
    /// 工程担保公司负责人联系电话/保险公司负责人电话
    ///</summary>
    [Display(Name = "工程担保公司负责人联系电话")]
    public string? SuperintendentMobile { get; set; }

    /// <summary>
    /// 工程担保公司注册金额
    ///</summary>
    [Display(Name = "工程担保公司注册金额")]
    public decimal? RegisteredCapital { get; set; }

    /************* 额外显示字段 ****************/

    /// <summary>
    /// 证书附件
    /// </summary>
    [Display(Name = "证书附件")]
    public IEnumerable<AttachmentsForm<int>> Attachments { get; set; } = new List<AttachmentsForm<int>>();
}